package com.young.core.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Objects;

public class ProjectDO implements Serializable {

    private int id;

    /**
     * 项目英文名,同客户端appName
     */
    private String name;

    private int language;

    private long departmentId;

    private String operator;

    private String token;

    /**
     * 是否需要审批
     */
    private boolean auditable = false;

    /**
     * 项目描述
     */
    private String description;

    private Date createTime;

    private Date updateTime;

    /**
     * 逻辑字段，用户列表
     */
    private List<ProjectUserDO> users;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getLanguage() {
        return language;
    }

    public void setLanguage(int language) {
        this.language = language;
    }

    public long getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(long departmentId) {
        this.departmentId = departmentId;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public boolean isAuditable() {
        return auditable;
    }

    public void setAuditable(boolean auditable) {
        this.auditable = auditable;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public List<ProjectUserDO> getUsers() {
        return users;
    }

    public void setUsers(List<ProjectUserDO> users) {
        this.users = users;
    }

    @Override
    public boolean equals(Object input) {
        if (this == input) {
            return true;
        }
        if (input == null || !(input instanceof ProjectDO)) {
            return false;
        }
        ProjectDO project = (ProjectDO) input;
        return Objects.equals(getName(), project.getName());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getName());
    }
}
